import Result from "@/model/Result";
import axios from "@/axios/api";
import type PageQuery from "@/model/PageQuery";
import type Page from "@/model/Page";
import type SysLog from "@/model/SysLog";

export default class SysLogApi {

    static get = async (id: number) => {
        return await axios.get<Result<SysLog>>(`/api/v1/sysLog/${id}`)
            .then(resp => resp.data)
    }

    static remove = async (id: number) => {
        return await axios.delete<Result<SysLog>>(`/api/v1/sysLog/${id}`)
            .then(resp => resp.data)
    }


    static page = async (query: PageQuery) => {
        return await axios.post<Result<Page<SysLog>>>(`/api/v1/sysLog/page`, query)
            .then(resp => resp.data)
    }
}